package top.hidoctor.auscultation.adapter;

import android.support.v7.widget.RecyclerView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.tang.user.UserInfo;

import java.util.List;

import top.hidoctor.auscultation.R;

public class WorkAdapter extends BaseQuickAdapter<UserInfo.MenuListBean> {
    public WorkAdapter(int layoutResId, List<UserInfo.MenuListBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, UserInfo.MenuListBean item) {
        helper.setText(R.id.tv_title, item.getTitle());
        if (item.getTitle().equals("我的心音样本")) {
            helper.setText(R.id.tv_content, "Sample");
            helper.setBackgroundRes(R.id.ll_labels, R.mipmap.ic_xinyin_yangben);
        } else if (item.getTitle().equals("标注包")) {
            helper.setText(R.id.tv_content, "Lable package");
            helper.setBackgroundRes(R.id.ll_labels, R.mipmap.ic_biaozhubao);
        } else if (item.getTitle().equals("标注工作台")) {
            helper.setText(R.id.tv_content, "Lable task list");
            helper.setBackgroundRes(R.id.ll_labels, R.mipmap.ic_biaozhulist);
        } else if (item.getTitle().equals("审核包")) {
            helper.setText(R.id.tv_content, "Audit package");
            helper.setBackgroundRes(R.id.ll_labels, R.mipmap.ic_shenhebao);
        } else if (item.getTitle().equals("审核工作台")) {
            helper.setText(R.id.tv_content, "Audit task list");
            helper.setBackgroundRes(R.id.ll_labels, R.mipmap.ic_shenhelist);
        } else if (item.getTitle().equals("样本仲裁")) {
            helper.setText(R.id.tv_content, "Arbitration");
            helper.setBackgroundRes(R.id.ll_labels, R.mipmap.ic_zhongcai);
        }
    }
}
